home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
351-375
/
disk_374
/
popart
/
sorcery
/
popchip.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
883b
|
32 lines
#include <intuition/intuition.h>
/* this works under Manx (16 bit ints). It's better than declaring
everything as "chip" (which my compiler tragically can't do),
since it only uses chip memory for as long as needed.
It needs the global "win" defined somehow. */
struct Image thing = { 0, 0, 32, 24, 5, NL, 0x1f, 0, NL },
void
popChip (array, size, xsize, ysize, xx, yy)
USHORT *array; long size;
{
REG USHORT *myChip;
if (!(myChip = (USHORT *) AllocMem (size, MEMF_CHIP | MEMF_CLEAR)))
{ /* puts ("Can't do it - no chips left!"); */ return; }
CopyMem (array, myChip, size);
thing.ImageData = myChip;
thing.Width = xsize;
thing.Height = ysize;
DrawImage (win->RPort, &thing, (long) xx, (long) yy);
FreeMem (myChip, size);
}